package com.wmccn.platform.util;

import groovy.util.Eval;

/**
 * @Title ScriptParserUtils.java 脚本解析工具类(groovy)
 * @author zhangliang
 * @Description:
 * @version $Rev:: $
 * @LastModify: $Id:: $
 */
public class ScriptParserUtil {
	/**
	 * @param exp
	 * @return
	 */
	public static boolean getStringResult(String expression) {
		if (expression == null || expression.trim().length() == 0) {
			throw new NullPointerException("表达式为null或空!");
		}
		Object pVal = Eval.me(expression);
		return Cast.to(pVal, false);
	}
}
